﻿@{
    ViewBag.Title = "Configuration";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="config2">
    <div class="panel panel-default">
        <div id="Tabs" role="tabpanel">
            <!-- Nav tabs -->
            <ul class="nav nav-tabs" role="tablist">
                <button onclick="getValues()" aria-controls="personal" role="tab" data-toggle="tab" class="tblev" style="width: 50%;">Values</button>
                <button aria-controls="employment" onclick="getSettings()" role="tab" data-toggle="tab" class="tblev" style="width: 50%;">Settings</button>
            </ul>
            <!-- Tab panes -->

        </div>
    </div>
</div>
<div id="container1">
</div>

<script>
    $(document).ready(function () {
        if (isEmpty($('#container1'))) {
            getValues();
        }
    });
    function isEmpty(el) {
        return !$.trim(el.html())
    }
    function getValues() {
        $('#loading').show();
        $('#container1').load('/SiteSetup/Values');
    }
    function getSettings() {
        $('#loading').fadeIn();
        $('#container1').load('/SiteSetup/Settings');
        $('#loading').fadeOut();

    }
    $('.tablinks').click(function () {
        $(this).addClass('buttoncolor-change').siblings().removeClass('buttoncolor-change');
    });
    $('.tblev').click(function () {
        $(this).addClass('tble').siblings().removeClass('tble');
    });
</script>
